/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Employee.java
 *
 * Created on Oct 29, 2011, 3:44:20 PM
 */
package VIMS;

/**
 *
 * @author shyan
 */
public class Dealer extends javax.swing.JFrame {

    /** Creates new form Employee */
    public Dealer() {
        super("Add New Dealer");
        initComponents();
        setLocationRelativeTo(null);
    }
    
     public Dealer(String state) 
    {
        super("Add New Dealer");
        initComponents();
        setLocationRelativeTo(null);
        AddDealerButton.setText(state);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLayeredPane1 = new javax.swing.JLayeredPane();
        DidLabel = new javax.swing.JLabel();
        DIdField = new javax.swing.JLabel();
        DnLabel = new javax.swing.JLabel();
        DealerName = new javax.swing.JTextField();
        DFnLabel = new javax.swing.JLabel();
        DFirstName = new javax.swing.JTextField();
        DLnLabel = new javax.swing.JLabel();
        DLastName = new javax.swing.JTextField();
        DIcLabel = new javax.swing.JLabel();
        DIcNum = new javax.swing.JTextField();
        DEmailLabel = new javax.swing.JLabel();
        DEmail = new javax.swing.JTextField();
        DConLabel = new javax.swing.JLabel();
        DContact = new javax.swing.JTextField();
        DGenderLabel = new javax.swing.JLabel();
        DGender = new javax.swing.JComboBox();
        DRaceLabel = new javax.swing.JLabel();
        DRace = new javax.swing.JComboBox();
        DReligionLabel = new javax.swing.JLabel();
        DReligion = new javax.swing.JComboBox();
        DcompanyLabel = new javax.swing.JLabel();
        Dcompany = new javax.swing.JTextField();
        DstatusLabel = new javax.swing.JLabel();
        DStatus = new javax.swing.JComboBox();
        DCityLabel = new javax.swing.JLabel();
        DCity = new javax.swing.JTextField();
        DPostCodeLabel = new javax.swing.JLabel();
        DPostCode = new javax.swing.JTextField();
        DAddLabel = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        DAddress = new javax.swing.JEditorPane();
        AddDealerButton = new javax.swing.JButton();
        CloseDealerButton = new javax.swing.JButton();
        V_Separator = new javax.swing.JSeparator();
        D_IPNameLabel = new javax.swing.JLabel();
        DIP_Name = new javax.swing.JTextField();
        D_IPContactLabel = new javax.swing.JLabel();
        DIP_Contact = new javax.swing.JTextField();
        D_IPEmailLabel = new javax.swing.JLabel();
        DIP_Email = new javax.swing.JTextField();
        Border1 = new javax.swing.JLabel();
        Border2 = new javax.swing.JLabel();
        Border3 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(800, 600));

        jLayeredPane1.setMaximumSize(new java.awt.Dimension(800, 600));
        jLayeredPane1.setMinimumSize(new java.awt.Dimension(800, 600));

        DidLabel.setText("Dealer ID :");
        DidLabel.setBounds(60, 60, 80, 30);
        jLayeredPane1.add(DidLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DIdField.setText("100002");
        DIdField.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        DIdField.setBounds(150, 60, 150, 30);
        jLayeredPane1.add(DIdField, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DnLabel.setText("User name :");
        DnLabel.setBounds(60, 100, 80, 30);
        jLayeredPane1.add(DnLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
        DealerName.setBounds(150, 100, 150, 30);
        jLayeredPane1.add(DealerName, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DFnLabel.setText("First name :");
        DFnLabel.setBounds(60, 140, 80, 30);
        jLayeredPane1.add(DFnLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
        DFirstName.setBounds(150, 140, 150, 30);
        jLayeredPane1.add(DFirstName, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DLnLabel.setText("Last name :");
        DLnLabel.setBounds(60, 180, 80, 30);
        jLayeredPane1.add(DLnLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
        DLastName.setBounds(150, 180, 150, 30);
        jLayeredPane1.add(DLastName, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DIcLabel.setText("IC no.       :");
        DIcLabel.setBounds(60, 220, 80, 30);
        jLayeredPane1.add(DIcLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
        DIcNum.setBounds(150, 220, 150, 30);
        jLayeredPane1.add(DIcNum, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DEmailLabel.setText("Email         :");
        DEmailLabel.setBounds(60, 260, 70, 30);
        jLayeredPane1.add(DEmailLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DEmail.setText("devil100001@Evil.com");
        DEmail.setBounds(150, 260, 150, 30);
        jLayeredPane1.add(DEmail, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DConLabel.setText("Contact    :");
        DConLabel.setBounds(60, 300, 70, 30);
        jLayeredPane1.add(DConLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
        DContact.setBounds(150, 300, 150, 30);
        jLayeredPane1.add(DContact, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DGenderLabel.setText("Gender    :");
        DGenderLabel.setBounds(60, 340, 70, 30);
        jLayeredPane1.add(DGenderLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DGender.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Choose", "Male", "Female" }));
        DGender.setBounds(150, 340, 80, 30);
        jLayeredPane1.add(DGender, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DRaceLabel.setText("Race        :");
        DRaceLabel.setBounds(60, 380, 70, 30);
        jLayeredPane1.add(DRaceLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DRace.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Choose", "Chinese", "Malay", "Indian", "Others" }));
        DRace.setBounds(150, 380, 80, 30);
        jLayeredPane1.add(DRace, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DReligionLabel.setText("Religion    :");
        DReligionLabel.setBounds(60, 420, 70, 30);
        jLayeredPane1.add(DReligionLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DReligion.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Choose", "Buddha", "Islam", "Hindu", "Others" }));
        DReligion.setBounds(150, 420, 80, 30);
        jLayeredPane1.add(DReligion, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DcompanyLabel.setText("Dealer's Company :");
        DcompanyLabel.setBounds(390, 60, 120, 30);
        jLayeredPane1.add(DcompanyLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
        Dcompany.setBounds(510, 60, 260, 30);
        jLayeredPane1.add(Dcompany, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DstatusLabel.setText("Status :");
        DstatusLabel.setBounds(390, 100, 80, 30);
        jLayeredPane1.add(DstatusLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DStatus.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Choose", "Cooperated", "Uncooperated" }));
        DStatus.setBounds(510, 100, 110, 30);
        jLayeredPane1.add(DStatus, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DCityLabel.setText("City          :");
        DCityLabel.setBounds(390, 140, 70, 30);
        jLayeredPane1.add(DCityLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
        DCity.setBounds(510, 140, 150, 30);
        jLayeredPane1.add(DCity, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DPostCodeLabel.setText("Postcode  :");
        DPostCodeLabel.setBounds(390, 180, 70, 30);
        jLayeredPane1.add(DPostCodeLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
        DPostCode.setBounds(510, 180, 150, 30);
        jLayeredPane1.add(DPostCode, javax.swing.JLayeredPane.DEFAULT_LAYER);

        DAddLabel.setText("Address    :");
        DAddLabel.setBounds(390, 220, 70, 30);
        jLayeredPane1.add(DAddLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jScrollPane1.setViewportView(DAddress);

        jScrollPane1.setBounds(510, 220, 150, 120);
        jLayeredPane1.add(jScrollPane1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        AddDealerButton.setText("Add");
        AddDealerButton.setBounds(620, 560, 80, 30);
        jLayeredPane1.add(AddDealerButton, javax.swing.JLayeredPane.DEFAULT_LAYER);

        CloseDealerButton.setText("Cancel");
        CloseDealerButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CloseDealerButtonActionPerformed(evt);
            }
        });
        CloseDealerButton.setBounds(700, 560, 80, 30);
        jLayeredPane1.add(CloseDealerButton, javax.swing.JLayeredPane.DEFAULT_LAYER);

        V_Separator.setOrientation(javax.swing.SwingConstants.VERTICAL);
        V_Separator.setBounds(350, 0, 10, 610);
        jLayeredPane1.add(V_Separator, javax.swing.JLayeredPane.DEFAULT_LAYER);

        D_IPNameLabel.setText("Name :");
        D_IPNameLabel.setBounds(390, 390, 80, 30);
        jLayeredPane1.add(D_IPNameLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
        DIP_Name.setBounds(510, 390, 150, 30);
        jLayeredPane1.add(DIP_Name, javax.swing.JLayeredPane.DEFAULT_LAYER);

        D_IPContactLabel.setText("Contact :");
        D_IPContactLabel.setBounds(390, 430, 80, 30);
        jLayeredPane1.add(D_IPContactLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
        DIP_Contact.setBounds(510, 430, 150, 30);
        jLayeredPane1.add(DIP_Contact, javax.swing.JLayeredPane.DEFAULT_LAYER);

        D_IPEmailLabel.setText("Email :");
        D_IPEmailLabel.setBounds(390, 470, 80, 30);
        jLayeredPane1.add(D_IPEmailLabel, javax.swing.JLayeredPane.DEFAULT_LAYER);
        DIP_Email.setBounds(510, 470, 150, 30);
        jLayeredPane1.add(DIP_Email, javax.swing.JLayeredPane.DEFAULT_LAYER);

        Border1.setFont(new java.awt.Font("Tahoma", 1, 18));
        Border1.setBorder(javax.swing.BorderFactory.createTitledBorder("Dealer's Personal Details :"));
        Border1.setBounds(30, 30, 300, 440);
        jLayeredPane1.add(Border1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        Border2.setFont(new java.awt.Font("Tahoma", 1, 18));
        Border2.setBorder(javax.swing.BorderFactory.createTitledBorder("Dealer's Company Details :"));
        Border2.setBounds(370, 30, 420, 320);
        jLayeredPane1.add(Border2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        Border3.setBorder(javax.swing.BorderFactory.createTitledBorder("Dealer's Contact Person :"));
        Border3.setBounds(370, 360, 420, 170);
        jLayeredPane1.add(Border3, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 800, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void CloseDealerButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CloseDealerButtonActionPerformed
        this.setVisible(false);
    }//GEN-LAST:event_CloseDealerButtonActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Dealer.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Dealer.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Dealer.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Dealer.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Dealer().setVisible(true);
                
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton AddDealerButton;
    private javax.swing.JLabel Border1;
    private javax.swing.JLabel Border2;
    private javax.swing.JLabel Border3;
    private javax.swing.JButton CloseDealerButton;
    private javax.swing.JLabel DAddLabel;
    private javax.swing.JEditorPane DAddress;
    private javax.swing.JTextField DCity;
    private javax.swing.JLabel DCityLabel;
    private javax.swing.JLabel DConLabel;
    private javax.swing.JTextField DContact;
    private javax.swing.JTextField DEmail;
    private javax.swing.JLabel DEmailLabel;
    private javax.swing.JTextField DFirstName;
    private javax.swing.JLabel DFnLabel;
    private javax.swing.JComboBox DGender;
    private javax.swing.JLabel DGenderLabel;
    private javax.swing.JTextField DIP_Contact;
    private javax.swing.JTextField DIP_Email;
    private javax.swing.JTextField DIP_Name;
    private javax.swing.JLabel DIcLabel;
    private javax.swing.JTextField DIcNum;
    private javax.swing.JLabel DIdField;
    private javax.swing.JTextField DLastName;
    private javax.swing.JLabel DLnLabel;
    private javax.swing.JTextField DPostCode;
    private javax.swing.JLabel DPostCodeLabel;
    private javax.swing.JComboBox DRace;
    private javax.swing.JLabel DRaceLabel;
    private javax.swing.JComboBox DReligion;
    private javax.swing.JLabel DReligionLabel;
    private javax.swing.JComboBox DStatus;
    private javax.swing.JLabel D_IPContactLabel;
    private javax.swing.JLabel D_IPEmailLabel;
    private javax.swing.JLabel D_IPNameLabel;
    private javax.swing.JTextField Dcompany;
    private javax.swing.JLabel DcompanyLabel;
    private javax.swing.JTextField DealerName;
    private javax.swing.JLabel DidLabel;
    private javax.swing.JLabel DnLabel;
    private javax.swing.JLabel DstatusLabel;
    private javax.swing.JSeparator V_Separator;
    private javax.swing.JLayeredPane jLayeredPane1;
    private javax.swing.JScrollPane jScrollPane1;
    // End of variables declaration//GEN-END:variables
}
